#元组生成器
t = (1,2,3)
print(type(tuple))
# print(tuple[0])
# print(tuple[1])
# print(tuple[2])
# tuple[2] = 6 元组不可修改
# print(tuple)

#元组生成式
t2 = (item for item in range(1,6))
# print(type(tuple2)) #<class 'generator'>
# print(tuple2) #<generator object <genexpr> at 0x0000019C0ECE5B40>
t3 = tuple(t2) #(1, 2, 3, 4, 5) 对象转元组
print(t3)

#遍历元组
# for i in t3:
#     print(i)